home *** CD-ROM | disk | FTP | other *** search
/ Night Owl 6 / Night Owl's Shareware - PDSI-006 - Night Owl Corp (1990).iso / 019a / templmac.zip / TEMPLATE.PAS < prev    next >
Pascal/Delphi Source File  |  1991-03-27  |  5KB  |  151 lines

  1. TEMPLATE.PAS: QEdit Language Template for PASCAL
  2.               (Top 20 lines are skipped)
  3. Last revised: 27-March-1991.   For use with "`" macro in TEMPLATE.QM.
  4.  
  5. Format is as follows:
  6.  
  7.       ■KEYWORD1                <---What you want to type
  8.       ###                      <---lines this text takes, minus 1
  9.       TEXT                     <---start of text to be inserted
  10.       etc
  11.       ■KEYWORD2                <---Next keyword to match
  12.       ###                      <---# of lines
  13.       TEXT                     <---text for this one.   And so on...
  14.       ...
  15.  
  16. Mandatory: CHR( 254 ) "■" precedes all keywords
  17. Optional:  CHR( 248 ) "°" marks cursor pos. in inserted text after insertion.
  18.  
  19. Anything between end of inserted text and next keyword is ignored, so you
  20. can include comments, etc.  We have put a line of dashes between each item.
  21. -----------------------------------------------------------------
  22. ■{                                      COMMENT BLOCK
  23. 6 lines
  24. {
  25. ****************************************************************
  26. *                                                              *
  27. *  °BLOCK COMMENT                                               *
  28. *                                                              *
  29. ****************************************************************
  30. }
  31. -----------------------------------------------------------------
  32. ■BEGIN                                 SIMPLE BEGIN/END PAIR
  33. 1 line
  34. BEGIN  { °block_comment }
  35. END;   { block_comment }
  36. -----------------------------------------------------------------
  37. ■CASE                                  CASE SELECT STATEMENT
  38. 6 lines
  39. CASE  °index  OF
  40.   val :
  41.     BEGIN
  42.     END;
  43.   val :
  44.     BEGIN
  45.     END;
  46. ELSE
  47. END;  { CASE comment }
  48. -----------------------------------------------------------------
  49. ■FOR                                   FOR LOOP
  50. 2 line
  51. FOR  °index := start TO finish  DO
  52.   BEGIN  { FOR comment }
  53.   END;   { FOR comment }
  54. -----------------------------------------------------------------
  55. ■IF                                    IF STATEMENT
  56. 5 lines
  57. IF  °TRUE  THEN
  58.   BEGIN  { IF comment }
  59.   END    { IF comment }
  60. ELSE
  61.   BEGIN  { ELSE comment }
  62.   END;   { ELSE comment }
  63. -----------------------------------------------------------------
  64. ■ELSE                                  ELSE CLAUSE ONLY
  65. 2 lines
  66. ELSE
  67.   BEGIN  { ELSE °comment }
  68.   END;   { ELSE comment }
  69. -----------------------------------------------------------------
  70. ■REPEAT                                REPEAT LOOP
  71. 1 line
  72. REPEAT
  73. UNTIL  °FALSE;
  74. -----------------------------------------------------------------
  75. ■WHILE                                 WHILE / DO LOOP
  76. 2 lines
  77. WHILE  °TRUE  DO
  78.   BEGIN  { WHILE comment }
  79.   END;   { WHILE comment }
  80. -----------------------------------------------------------------
  81. ■WITH                                  WITH  STATEMENT
  82. 2 lines
  83. WITH  °expression  DO
  84.   BEGIN  { WITH comment }
  85.   END;   { WITH comment }
  86. -----------------------------------------------------------------
  87. ■PROCEDURE                             PROCEDURE DEFINITION
  88. 3 lines
  89. PROCEDURE  °proc_name(
  90.   );
  91. BEGIN  { PROCEDURE proc_name }
  92. END;   { PROCEDURE proc_name }
  93.  
  94. -----------------------------------------------------------------
  95. ■FUNCTION                              FUNCTION DEFINITION
  96. 4 lines
  97. FUNCTION  °func_name(
  98.   ) : type;
  99. BEGIN  { FUNCTION func_name }
  100. END;   { FUNCTION func_name }
  101.  
  102. -----------------------------------------------------------------
  103. ■ARRAY                                 ARRAY DEFINITION
  104. 0 lines
  105. ARRAY [ °x..y ] OF type;
  106. -----------------------------------------------------------------
  107. ■VAR                                   VAR DEFINITION
  108. 2 lines
  109. VAR
  110.   °name                 : type;
  111.  
  112. -----------------------------------------------------------------
  113. ■CONST                                 CONST DEFINITION
  114. 2 lines
  115. CONST
  116.   °name                 = value;
  117.  
  118. -----------------------------------------------------------------
  119. ■TYPE                                  TYPE DEFINITION
  120. 2 lines
  121. TYPE
  122.   °name                 = value;
  123.  
  124. -----------------------------------------------------------------
  125. ■RECORD                                RECORD DEFINITION
  126. 1 line
  127. RECORD { RECORD °comment }
  128. END;   { RECORD comment }
  129. -----------------------------------------------------------------
  130. ■PROGRAM                               PROGRAM BLOCK
  131. 3 lines
  132. PROGRAM  °program_name( INPUT, OUTPUT );
  133.  
  134. BEGIN  { PROGRAM program_name }
  135. END.   { PROGRAM program_name }
  136. -----------------------------------------------------------------
  137. ■UNIT                                  TURBO/UCSD PASCAL UNIT
  138. 9 lines
  139. UNIT  °unit_name;
  140.  
  141. INTERFACE
  142.  
  143. USES  ;
  144.  
  145. IMPLEMENTATION
  146.  
  147. BEGIN  { UNIT unit_name }
  148. END.   { UNIT unit_name }
  149. -----------------------------------------------------------------
  150. ***EOF: TEMPLATE.PAS***
  151.